From 5b42a33d251de1f5f9cfc7d43b53505be180be4f Mon Sep 17 00:00:00 2001 From: whitequark Date: Thu, 29 Sep 2016 11:22:40 +0000 Subject: [PATCH] doc: build-script: use cfg(unix), not a hardcoded x86_64 triple This used to not be possible, but it is now, so let's promote best practices. --- src/doc/build-script.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/doc/build-script.md b/src/doc/build-script.md index cc50b4c74..f5fe8e283 100644 --- a/src/doc/build-script.md +++ b/src/doc/build-script.md @@ -440,7 +440,7 @@ build = "build.rs" [dependencies] libssh2-sys = { git = "https://github.com/alexcrichton/ssh2-rs" } -[target.x86_64-unknown-linux-gnu.dependencies] +[target.'cfg(unix)'.dependencies] openssl-sys = { git = "https://github.com/alexcrichton/openssl-sys" } # ... @@ -452,7 +452,7 @@ crate (`libgit2-sys`) links to the `git2` native library. Here we also see the unconditional dependency on `libssh2` via the `libssh2-sys` crate, as well as a platform-specific dependency on `openssl-sys` -for unix (other variants elided for now). It may seem a little counterintuitive +for \*nix (other variants elided for now). It may seem a little counterintuitive to express *C dependencies* in the *Cargo manifest*, but this is actually using one of Cargo’s conventions in this space. -- 2.30.2